class Solution {
public:
    TreeNode* Mirror(TreeNode* pRoot) {
        // write code here
        if (!pRoot || (!pRoot->left && !pRoot->right))
            return pRoot;
        else if (pRoot)
            swap(pRoot->left, pRoot->right);
        Mirror(pRoot->left);
        Mirror(pRoot->right);
        return pRoot;
    }
};